<nav class="navbar navbar-default lg-nav">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="${ctxPath}/">爱设团</a>
        </div>
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li class="dropdown nav-list">
                    <button class="dropdown-toggle btn btn-default nav-button" data-toggle="dropdown"
                            aria-expanded="false">
                        分类
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu list" role="menu">
                        <%for(category in categories){%>

                        <li><a href="${ctxPath}/design/listByCategory?category=${category.id}">${category.name}</a></li>

                        <%}%>
                    </ul>
                </li>
            </ul>
            <form class="navbar-form navbar-left" action="${ctxPath}/design/listBySearch" method="get" role="search">
                <div class="input-group">
                    <input type="text" class="form-control" name="content" placeholder="Search">
							<span class="input-group-btn">
								<button class="btn btn-default" type="submit">搜索</button>
							</span>
                </div>
            </form>
            <ul class="nav navbar-nav">
                <li>
                    <a href="${ctxPath}/img/listAll">素材库</a>
                </li>
                <li>
                    <a href="${ctxPath}/addImg">添加素材</a>
                </li>
                <li>
                    <a href="${ctxPath}/addDesign">我要设计</a>
                </li>
            </ul>

            <%if(session.user==null){%>
            <ul class="nav navbar-nav navbar-right">
                <li>
                    <button type="button" class="btn btn-danger nav-reg"
                            onclick="window.location='${ctxPath}/register'">注册
                    </button>
                </li>
                <li>
                    <a href="${ctxPath}/login" class="nav nav-login">登录</a>
                </li>
                <li>
                    <p class="navbar-text">
                        关联账号登录：
                        <span>QQ</span>
                        <span>新浪微博</span>
                    </p>
                </li>
            </ul>

            <%}else{%>
            <ul class="nav navbar-nav navbar-right">
                <li class="no-line">
                    <a href="">社区</a>
                </li>
                <li>
                    <div class="line"></div>
                </li>
                <li class="dropdown no-line">
                    <a href="javascript:void(0);" class="nav">消息&nbsp;
                        <%if(session.sessionEnv.flag){%>
                        <span class="badge"> new </span>
                        <%}%>
                    </a>

                    <div class="arrow"></div>
                    <ul class="dropdown-menu nav-mess">
                        <li class="nav-icon">
                            <ul class="nav nav-tabs">
                                <li role="presentation" class="active icon-trends"><a href="#"><span
                                        class="glyphicon glyphicon-th-list"></span></a></li>
                                <li role="presentation" class="icon-shop"><a href="#"><span
                                        class="glyphicon glyphicon-shopping-cart"></span></a></li>
                                <li role="presentation" class="icon-bell"><a href="#"><span
                                        class="glyphicon glyphicon-bell"></span></a></li>

                            </ul>
                        </li>
                        <li class="nav-mess-content">
                            <ul class="icon-trends mess-cur">
                                <%for(order_n in session.sessionEnv.list_order){%>
                                <li>
                                    <span>订单:</span><a href="${ctxPath}/notice?notice=${order_n.id}">${order_n.design.name}</a>
                                    <span>有新消息</span>
                                </li>
                                <%}%>
                                <li>
                                    <a href="${ctxPath}/user/myNotice">查看更多...</a>
                                </li>
                            </ul>
                            <ul class="icon-shop">
                                <%for(notice_n in session.sessionEnv.list_notice){%>
                                <li>
                                    <a href="${ctxPath}/notice?notice=${notice_n.id}">${notice_n.user.name}留言了你的T恤</a>
                                </li>
                                <%}%>
                                <li>
                                    <a href="${ctxPath}/user/myNotice">查看更多...</a>
                                </li>
                            </ul>
                            <ul class="icon-bell">
                                <%for(message_n in session.sessionEnv.list_message){%>
                                <li>
                                    <a href="${ctxPath}/message/check?message=${message_n.id}">新私信</a>
                                </li>

                                <%}%>
                                <li>
                                    <a href="${ctxPath}/message/">查看更多...</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
                <li>
                    <div class="line"></div>
                </li>
                <li class="dropdown nav-account">
                    <a href="">
                        <img src="${session.user.img}" alt="头像" class="nav-avatar"/>
                        <span>&nbsp;&nbsp;${session.user.name}</span>
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu" role="menu">
                        <li>
                            <a href="/user/userInfo?user=${session.user.id}">
                                <span class="glyphicon glyphicon-user"></span>
                                我的主页
                            </a>
                        </li>
                        <li>
                            <a href="#">
                                <span class="glyphicon glyphicon-envelope"></span>
                                站内信
                            </a>
                        </li>
                        <li>
                            <a href="#">
                                <span class="glyphicon glyphicon-cog"></span>
                                账号设置
                            </a>
                        </li>
                        <li>
                            <a href="/user/logout">
                                <span class="glyphicon glyphicon-off"></span>
                                退出账号
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>


        </div>
    </div>
</nav>
<nav class="navbar navbar-default lg-nav group">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="../group/group.html">设团小组</a>
        </div>
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li>
                    <a href="/group/toHotTopic?type=1">体育</a>
                </li>
                <li>
                    <a href="/group/toHotTopic?type=1">动漫</a>
                </li>
                <li>
                    <a href="/group/toHotTopic?type=1">电影</a>
                </li>

            </ul>
            <form class="navbar-form navbar-right" role="search">
                <div class="input-group">
                    <input type="text" class="form-control" placeholder="小组、话题">
						<span class="input-group-btn">
							<button class="btn btn-default" type="button">搜索</button>
						</span>
                </div>
            </form>
            <%}%>
        </div>
    </div>
</nav>

